﻿namespace HZY.Framework.Core.Redis;

public static class RedisUtil
{
    /// <summary>
    /// Register the Redis module
    /// </summary>
    /// <param name="services"></param>
    /// <param name="connectionString"></param>
    public static void AddRedisService(this IServiceCollection services, string connectionString)
    {
        services.AddSingleton(typeof(IRedisService), serviceProvider => new RedisServiceImpl(connectionString));
    }
}